<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/ukkepuk/source/php/classes/model/AbstractEntity.php'); 

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Food
 *
 * @author virtual
 */
class Food extends AbstractEntity {
    private $recipeId;
    private $kidsId;
    private $eatFrom;
    private $eatTo;
    private $score;
    
    
    public function getRecipeId() {  return $this->recipeId;    }
    public function getKidsId() {  return $this->kidsId;    }
    public function getEatFrom() {  return $this->eatFrom;    }
    public function getEatTo() {  return $this->eatTo;    }
   
    public function getScore() {  return $this->score;    }
    
    public function setRecipeId($recipeId) { $this->recipeId = $recipeId; }
    public function setKidsId($kidsId) { $this->kidsId = $kidsId; }
    public function setEatFrom($eatFrom) { $this->eatFrom = $eatFrom; }
    public function setEatTo($eatTo) { $this->eatTo = $eatTo; }    
    
    public function setScore($score) { $this->score = $score; }
    
    public function setTimeFrom($time) {
        $this->eatFrom = CalendarUtils::createDateFromTime($time);
    }
    public function setTimeTo($time) {
        $this->eatTo = CalendarUtils::createDateFromTime($time);
    }
    
    public function getTimeFrom() {
        return CalendarUtils::transformDateToTime($this->eatFrom);
    }
    
    public function getTimeTo() {
        return CalendarUtils::transformDateToTime($this->eatTo);
    }
    
    public function getEatFromTimestampString() {
        return CalendarUtils::transformDateToTimestamp($this->eatFrom);
    }
    public function getEatToTimestampString(){
        return CalendarUtils::transformDateToTimestamp($this->eatTo);
    }
   
    private $recipeString;
    
    public function getRecipeString() {
        return $this->recipeString;
    }
    public function setRecipeString($recipeString) {
        $this->recipeString = $recipeString;
    }
    
    public function getBegin(){
        return $this->booleanToYesNo($this->eatTo == null);
    }

    
}

?>
